tag @e[type=zombie] add rmr.connect.maybe_owner
tag @e[type=player] add rmr.connect.maybe_owner
function rmr:connect/find
tag @s add rmr.self

execute at @s as @e[distance=..10, tag=!rmr.self, tag=!rmr.connect.owner, tag=rmr.attackable, type=#rmr:dont_attack] run tag @s add rmr.maybe_target
execute at @s as @e[distance=..10, tag=!rmr.self, tag=!rmr.connect.owner, type=!#rmr:dont_attack] run tag @s add rmr.maybe_target

execute as @e[tag=rmr.maybe_target] run function rmr:hitbox/make_abox

data modify storage minecraft:rmr arguments.pos set from entity @s Pos
scoreboard objectives add rmr.local.fly_times dummy
function rmr:entity/flying_axe/collide
scoreboard objectives remove rmr.local.fly_times

tag @s remove rmr.self
tag @e[tag=rmr.maybe_target] remove rmr.maybe_target
tag @e[tag=rmr.connect.maybe_owner] remove rmr.connect.maybe_owner